package org.ww.edu.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.ww.commonutils.R;

import java.util.List;
//服务发现（vod），出错了执行熔断器
@FeignClient(value = "vod",fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {

    //删除阿里云视频
    @DeleteMapping("/vod/video/removeVod/{id}")   //此处必须是全路径
    public R removeVod(@PathVariable("id") String id);  //注解@PathVariable必须带参数

    //批量删除视频
    @DeleteMapping("/vod/video/delete-batch")
    public R deleteBatch(@RequestParam("videoIds") List<String> videoIds);
}
